Repository navigation
Conversation
* chore(release): release tool, release.toml and seeded CHANGELOG Vendored from scalekit-sdks-wrapper/tools/release. The matching workflow changes (release-checks.yml, release.yml, build.yml workflow_call) ship in a separate commit because they need a push credential with the GitHub 'workflow' scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * chore(release): drive releases from scalekit-sdks-wrapper The release tool and its config now live only in the wrapper (tools/release). This repo keeps CHANGELOG.md and .changes/unreleased/ (release notes waiting for the next release). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * ci(release): approval-gated release workflow - release.yml (workflow_dispatch, version input): validates the version against the source, the tags and CHANGELOG.md; reuses build.yml as CI; builds; waits for the 'release' environment approval; tags with the release app; publishes; creates the GitHub Release from the CHANGELOG; verifies the registry. dry_run rehearses without tagging or publishing. - build.yml: add workflow_call so the release reuses the exact PR CI. Generated by scalekit-sdks-wrapper/tools/release/templates/workflows/generate.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * docs: describe how this repo's existing release workflow is started Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * ci(release): keep the existing release workflow Restores .github/workflows as on main: releases keep using the existing workflow (or stay manual), started from scalekit-sdks-wrapper after release.py preflight; every PR already has to pass build.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * docs: describe release notes and the release workflow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ANmBCXNdijNmAJ49zFRPv * docs(changelog): add the latest release and simplify the header Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): fix typos and defaults in imported release history Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): drop leftover contributor handles, reword the import note Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(changelog): fix typos and a broken reference in imported release history Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
Add actions.mcp.createConnectionSessionToken({ connectionName, identifier,
expirySeconds?, accessLevel? }). It mints a session token for the MCP
server of a single connection (/mcp/v3/connections/<connectionName>) by
sending the connection name as keyId and leaving mcpConfigId unset. The
expirySeconds validation is shared with createSessionToken, whose
behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unt rules Document that connectionName is matched to the stored name's casing for the token, the accepted expiry range (60 seconds to 24 hours, default 1 hour), and that a missing connected account is either rejected or results in a pending account, depending on the environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tokens The connection name is matched without regard to case and the token is issued for the server URL built from the connection's stored name. Only that URL is case-sensitive, so callers connect using the stored name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
State that identifier is 1 to 255 characters, and tighten the release note for createConnectionSessionToken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nnection-session-token
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
createSessionToken now accepts either mcpConfigId or connectionName. The params type is a union so TypeScript rejects both and neither, and the method also checks at runtime that exactly one non-empty target is set before sending a request. A connectionName is sent as keyId; calls with mcpConfigId are unchanged. The separate connection method is removed, and the reference and release note describe the new form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createSessionToken validates expirySeconds first, as before, and only checks the target for the connectionName form. Without a non-empty connectionName the request is built exactly as in v2.19.0: mcpConfigId is passed through as given, an empty connectionName is ignored, and a missing ID still reaches the server. A connectionName alongside mcpConfigId, or a non-string connectionName, throws before any request. Tests pin the unchanged mcpConfigId behaviour, and the live connection test deletes a connected account only if it created one. The reference and release note say the new checks apply to connectionName only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A call that sets both mcpConfigId and connectionName, for example by
spreading a context object that carries connectionName, compiled and
minted a configuration token before. It does again: a non-empty
mcpConfigId always selects the configuration and the request is built
as before. connectionName is used only when mcpConfigId is missing or
empty, and only that form is checked before the request, now including
an empty identifier ("identifier is required").
The params type lets the configuration form carry connectionName and
still rejects a call with neither target or without an identifier. The
reference and release note describe the precedence and the token
lifetime range for both targets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
When merging: several commits on this branch end with a Generated by Claude Code |
saif-at-scalekit
left a comment
There was a problem hiding this comment.
Tried minting a session token for a connection’s own MCP server with connectionName + identifier, then pointing an MCP client at that connection URL.
After this ships, that path works the same way the Virtual MCP config path already did — nothing else to request for the developer experience.
Sent by pocket agent saif-waiting-review
Description
Every AgentKit connection has its own MCP server at
<environment URL>/mcp/v3/connections/<connection name>. It serves all of that connection's tools without an MCP configuration.createSessionTokencan now mint a token for that server: passconnectionNameinstead ofmcpConfigId.Behaviour:
mcpConfigIdset to a non-empty string: a config token, built exactly as in v2.19.0. AnyconnectionNameis ignored, as it was in v2.19.0.connectionNameset to a non-empty string: a connection token. The name is sent as the request'skeyId, andmcpConfigIdis never set.connectionName, or anidentifierthat is missing, empty or blank, throws before any request.expirySecondsandaccessLevelare sent only when given, so the server defaults apply for either target: 1 hour (60 seconds to 24 hours allowed), full access.accessLevel: 'READ_ONLY'limits the token to tools marked read-only. Other tools are left out oftools/list, and calling one returnsunknown tool "<name>".ScalekitNotFoundException: no active connection with that name.ScalekitBadRequestException: invalid input, a connection that isn't an AgentKit connection, or, depending on the environment's configuration, no active connected account for the identifier. Where that last case doesn't fail, the server creates a pending connected account if the identifier has none.CreateMcpSessionTokenParamsis exported from the package root.lib/is rebuilt.Usage
Testing
npm run build,npm run lintandnpm run prettier: pass. The build leaves the committedlib/unchanged.tests/mcp-session-token.test.ts: 41 credential-free tests, all passing. They cover:nullIDs, a strayconnectionName, and{ ...ctx, mcpConfigId }spreads;expirySecondsbeing checked first;ScalekitExceptionsubclasses;identifier.tests/actions.test.ts:READ_ONLYfor a connection, deleting any pending connected account the test created;ScalekitNotFoundException;mcpConfigIdwins when both are set.Release
No release (skip-release). The notes wait in
.changes/unreleased. They describecreateSessionToken({ connectionName, identifier, expirySeconds?, accessLevel? }), sayaccessLevelworks for either target, saymcpConfigIdis used when both are set, and say existingmcpConfigIdcalls are unchanged.Scope
accessLeveland the proto update this change needs. This branch contains [SK-2195] feat(mcp): add accessLevel to createSessionToken #239's commit, so merge [SK-2195] feat(mcp): add accessLevel to createSessionToken #239 first; this PR's diff then reduces to this change.addedfragment foraccessLevel.create_session_token(connection_name=...).connectionName. The parameter type widens to acceptconnectionName.🤖 Generated with Claude Code